< previous page page_614 next page >

Page 614
Table 30.3 Common Properties of the Button Objects.
PropertyDescription
IndexThe index number of where in the Buttons collection this Button object is located.
CaptionThe caption to display at the bottom of the button. This property can be used in combination with the Image property to display a button that has both a caption and an image. Typically, you find this on a 32 × 32 pixel button, not on the smaller 16 × 16 pixel buttons.
DescriptionThis description of the button is displayed in the Customize toolbox at runtime. This helps the user determine which buttons to get rid of or add to the toolbar.
KeyThis is a unique value for the selected Button object. It must be unique within the total collection of Buttons for this toolbar. You should use the Key property to reference a particular button, as opposed to using the Index property, because you might move buttons around in the toolbar, which affects the Index property but not the Key property.
ValueThis represents the state of the Button object at runtime. It can either be tbrUnPressed or tbrPressed to represent whether the user has selected this button.
StyleThere are six different styles of buttons you can select. See the next section for a description of each style of button.
ToolTipTextSet this property to the value you want to have displayed when the user hovers his or her cursor over this button.
ImageThis property is either the Index number or the Key value of a particular image in the ImageList control, which is set in the ImageList property of the toolbar.
TagThis property can be used for anything you want.
MixedStateThis property returns a True or False value, or it can be set to True or False if a button is in an indeterminate state. For example, if youve created a button group of Bold, Italic, and Underline buttons, and you highlight a piece of text that contains bold text, italic text, and normal text, then the Bold and Italic buttons would be set to MixedState because there are three different types of formatting applied to the selected text.

 
< previous page page_614 next page >

If you like this book, buy it!